-- GENERATED SPELL FOR [Wretched Fiend] --


function spell0_24966(pUnit, Event) --@Bitter Withdrawal,n/a--
pUnit:FullCastSpellOnTarget(29098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24966', 5000, 1)
end

function spell1_24966(pUnit, Event) --@Sleeping Sleep,Self--
pUnit:FullCastSpellOnTarget(42648,pUnit)
pUnit:RegisterEvent('Sorts_24966', 612, 1)
end

function spell2_24966(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(11971,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24966', 30285, 1)
end

function Sorts_24966(pUnit, Event)
local choix_sorts_24966 = math.random(0, 2)
if choix_sorts_24966 == 0 then
pUnit:RegisterEvent('spell0_24966', 1, 1)
end
if choix_sorts_24966 == 1 then
pUnit:RegisterEvent('spell1_24966', 1, 1)
end
if choix_sorts_24966 == 2 then
pUnit:RegisterEvent('spell2_24966', 1, 1)
end
end

function mob24966_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24966', math.random(1500, 3000), 1)
end

function mob24966_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24966_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24966_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24966, 1, 'mob24966_Action')
RegisterUnitEvent(24966, 2, 'mob24966_Leave')
RegisterUnitEvent(24966, 3, 'mob24966_Kill')
RegisterUnitEvent(24966, 4, 'mob24966_Die')
